import { PlainObject } from "@/bean/index"
import request from "@/utils/request"

export function checkLogin() {
    return request({
        method: "POST",
        url: "api/user/checkLogin",
    })
}

export function getUserInfo() {
    return request({
        method: "POST",
        url: "api/user/getUserInfo",
    })
}

export function register(data: PlainObject) {
    return request({
        method: "POST",
        url: "api/user/register",
        data
    })
}

export function login(data: PlainObject) {
    return request({
        method: "POST",
        url: "api/user/login",
        data
    })
}

export function changePassword(data: PlainObject) {
    return request({
        method: "POST",
        url: "api/user/changePassword",
        data
    })
}

export function changeAvatar(data: any) {
    return request({
        method: "POST",
        url: "api/user/changeAvatar",
        data
    })
}
